﻿using System;
using System.Text;

namespace LTJ.Entity
{
    /// <summary>
    /// 枚举设置
    /// </summary>
    public class EnumType
    {
        /// <summary>
        /// 获取证件类型信息
        /// </summary>
        public static string GetCardTypeName(CardType type)
        {
            return GetCardTypeName(Convert.ToInt16(type));
        }
        /// <summary>
        /// 获取证件类型信息
        /// </summary>
        public static string GetCardTypeName(int tvalue)
        {
            switch (tvalue)
            {
                case 1: return "身份证";
                default: return "";
            }
        }
        /// <summary>
        /// 获取用户类型
        /// </summary>
        public static string GetCorpTypeName(CorpType type)
        {
            return GetCardTypeName(Convert.ToInt16(type));
        }
        /// <summary>
        /// 获取用户类型
        /// </summary>
        public static string GetCorpTypeName(int tvalue)
        {
            switch (tvalue)
            {
                case 1: return "普通用户";
                case 2: return "管理员";
                default: return "";
            }
        }
        /// <summary>
        /// 获取基础数据类别（扩展项）
        /// </summary>
        public static string GetBaseType(BType type)
        {
            return GetBaseType(Convert.ToInt16(type));
        }
        /// <summary>
        /// 获取基础数据类别（扩展项）
        /// </summary>
        public static string GetBaseType(int tvalue)
        {
            string ecname = "";
            switch (tvalue)
            {
                case 1:
                    ecname = "启运港";
                    break;
                case 2:
                    ecname = "所属航线";
                    break;
                case 3:
                    ecname = "国家";
                    break;
            }
            return ecname;
        }
        /// <summary>
        /// 获取检查类型信息
        /// </summary>
        public static string GetCheckTypeName(CheckType type)
        {
            return GetCheckTypeName(Convert.ToInt16(type));
        }
        /// <summary>
        /// 获取检查类型信息
        /// </summary>
        public static string GetCheckTypeName(int tvalue)
        {
            switch (tvalue)
            {
                case 1: return "检测项目";
                case 2: return "医生检查";
                case 3: return "功能检查";
                default: return "";
            }
        }
        /// <summary>
        /// 获取基本操作模型实体
        /// </summary>
        public static string GetOpModeName(OPMode type)
        {
            return GetOpModeName(Convert.ToInt16(type));
        }
        /// <summary>
        /// 获取基本操作模型实体
        /// </summary>
        public static string GetOpModeName(int typevalue)
        {
            switch (typevalue)
            {
                case 1: return "普通价格操作";
                case 2: return "等级价格操作";
                case 3: return "个人基本信息";
                case 4: return "企业基本信息";
                default: return "";
            }
        }
        /// <summary>
        /// 获取管理组别
        /// </summary>
        public static string GetGroupType(ManageGroup type)
        {
            return GetGroupType(Convert.ToInt16(type));
        }
        /// <summary>
        /// 获取管理组别
        /// </summary>
        public static string GetGroupType(int typevalue)
        {
            switch (typevalue)
            {
                case 1: return "普通组";
                case 2: return "管理组";
                case 20: return "企业管理组";
                default: return "";
            }
        }
        /// <summary>
        /// 获取主营业务类型组
        /// </summary>
        public static string GetMainEnumTypeArray(string typevaluestr)
        {
            string rstr = "";

            if (typevaluestr != "")
            {
                foreach (string str in typevaluestr.Split(','))
                {
                    rstr += GetMainEnumType(Convert.ToInt16(str)) + ",";
                }
            }

            return rstr.Trim(',');
        }
        /// <summary>
        /// 获取主营业务类型
        /// </summary>
        public static string GetMainEnumType(int typevalue)
        {
            switch (typevalue)
            {
                case 1: return "整柜";
                case 2: return "特种柜";
                case 3: return "拼柜";
                case 4: return "空运";
                case 5: return "集装箱拖卡";
                default: return "";
            }
        }
        /// <summary>
        /// 获取搜索操作
        /// </summary>
        public static string GetSearchAction(SearchAct satype)
        {
            return GetSearchAction(Convert.ToInt16(satype));
        }
        /// <summary>
        /// 获取搜索操作
        /// </summary>
        public static string GetSearchAction(int typevalue)
        {
            switch (typevalue)
            {
                case 1: return "搜索";
                case 2: return "点击查看";
                default: return "";
            }
        }
    }
    /// <summary>
    /// 检测类型
    /// </summary>
    public enum CheckType
    {
        /// <summary>
        /// 检测项目
        /// </summary>
        CheckItem = 1,
        /// <summary>
        /// 医生检查
        /// </summary>
        DoctorItem = 2,
        /// <summary>
        /// 功能检查
        /// </summary>
        FuncItem = 3
    }

    /// <summary>
    /// 信息类型
    /// </summary>
    public enum MsgType
    {
        /// <summary>
        /// 正确信息
        /// </summary>
        RightMsg = 1,
        /// <summary>
        /// 错误信息
        /// </summary>
        ErrorMsg = 2,
        /// <summary>
        /// 提示信息
        /// </summary>
        NoteMsg = 3
    }
    /// <summary>
    /// 用户菜单类型
    /// </summary>
    public enum UserMenuType
    {
        /// <summary>
        /// 顶级菜单
        /// </summary>
        TopMenu = 1,
        /// <summary>
        /// 主菜单
        /// </summary>
        MainMenu = 2,
        /// <summary>
        /// 一级子菜单
        /// </summary>
        SubMenu = 3
    }
    /// <summary>
    /// 证件类型
    /// </summary>
    public enum CardType
    {
        /// <summary>
        /// 身份证
        /// </summary>
        IDCard = 1
    }
    /// <summary>
    /// 用户类型
    /// </summary>
    public enum CorpType
    {
        /// <summary>
        /// 普通用户
        /// </summary>
        CommonUser= 1,
        /// <summary>
        /// 管理员
        /// </summary>
        Admin = 2
    }
    /// <summary>
    /// 基础数据类别（扩展项）
    /// </summary>
    public enum BType
    {
        /// <summary>
        /// 启运港
        /// </summary>
        Port = 1,
        /// <summary>
        /// 所属航线
        /// </summary>
        Routes = 2,
        /// <summary>
        /// 国家
        /// </summary>
        National= 3
    }
    /// <summary>
    /// 查询基础数据类型
    /// </summary>
    public enum DataMode
    {
        /// <summary>
        /// 目的港
        /// </summary>
        PopPort = 1,
        /// <summary>
        /// 船公司
        /// </summary>
        BoatCarr = 2,
        /// <summary>
        /// 起始港
        /// </summary>
        LoadPort = 3,
        /// <summary>
        /// 中转港
        /// </summary>
        TranPort = 4,
        /// <summary>
        /// 码头
        /// </summary>
        Dock = 5,
        /// <summary>
        /// 航线
        /// </summary>
        RouteArray = 6,
        /// <summary>
        /// 弹出航线
        /// </summary>
        PopRoute = 7
    }
    /// <summary>
    /// 操作实体
    /// </summary>
    public enum OPMode
    {
        /// <summary>
        /// 普通价格操作
        /// </summary>
        NormalPrice = 1,
        /// <summary>
        /// 等级价格操作
        /// </summary>
        LevelPrice = 2,
        /// <summary>
        /// 个人基本信息
        /// </summary>
        PersonInfomation = 3,
        /// <summary>
        /// 企业基本信息
        /// </summary>
        CorpInfo = 4
    }
    /// <summary>
    /// 管理组别
    /// </summary>
    public enum ManageGroup
    {
        /// <summary>
        /// 普通组
        /// </summary>
        NormalGroup = 1,
        /// <summary>
        /// 管理组
        /// </summary>
        AdminGroup = 2,
        /// <summary>
        /// 企业管理组
        /// </summary>
        CorpGroup = 20        
    }
    /// <summary>
    /// 操作动作
    /// </summary>
    public enum OprateAction
    {
        /// <summary>
        /// 创建/新增
        /// </summary>
        Create,
        /// <summary>
        /// 修改/编辑
        /// </summary>
        Update,
        /// <summary>
        /// 删除
        /// </summary>
        Delete,
        /// <summary>
        /// 读取
        /// </summary>
        Read
    }
    /// <summary>
    /// 主营业务实体
    /// </summary>
    public enum MainEnum
    {
        /// <summary>
        /// 整柜
        /// </summary>
        FCL = 1,
        /// <summary>
        /// 特种柜
        /// </summary>
        SCAB = 2,
        /// <summary>
        /// 拼柜
        /// </summary>
        LCL = 3,
        /// <summary>
        /// 空运
        /// </summary>
        AIR = 4,
        /// <summary>
        /// 集装箱拖卡
        /// </summary>
        TRAILER = 5
    }
    /// <summary>
    /// 搜索操作
    /// </summary>
    public enum SearchAct
    {
        /// <summary>
        /// 搜索
        /// </summary>
        WholeSearch = 1,
        /// <summary>
        /// 点击查看
        /// </summary>
        WholeView = 2
    }
}
